package ast;

public class Case extends Process {

	private Expression e;
	private TermVar y;
	private Process process1;
	private Process process2;
	
	public Case(Expression exp, TermVar tv, Process proc1, Process proc2)
	{
		e = exp;
		y = tv;
		process1 = proc1;
		process2 = proc2;
	}
	
	public Expression getE() {
		return e;
	}

	public TermVar getY() {
		return y;
	}

	public Process getProcess1() {
		return process1;
	}

	public Process getProcess2() {
		return process2;
	}
	
	public void setProcess1(Process process1) {
		this.process1 = process1;
	}

	public void setProcess2(Process process2) {
		this.process2 = process2;
	}

	public String toString(int indent)
	{
		String res = "";
		res += "case " + e + " of some(" + y + "):";
		res += " " + process1.toString(0);
		res += " else ";
		res += process2.toString(0);
		
		return res;
	}
	
}
